<template>
  <div class="ui-dataset">
    <div class="ui-dataset__head" v-if="title">
      <span class="ui-dataset__title">{{ title }}</span>
    </div>
    <div class="ui-dataset__body">
      <slot></slot>
    </div>
  </div>
</template>
<script>
export default {
  name: 'UiDataset',
  provide() {
    return {
      UiDataset: this
    }
  },
  props: {
    title: {
      type: String
    },
    labelWidth: {
      type: String,
      default: '60px'
    },
    labelPosition: {
      type: String,
      default: 'left',
      validator (value) {
        return ['left', 'right'].includes(value)
      }
    }
  }
}
</script>
<style lang="less">
.ui-dataset__head{
  height: 32px;
  line-height: 32px;
  margin-bottom: 3px;
}
.ui-dataset__title{
}
</style>
